/**
 * @module 预约类别
 * @author Yun Tang 
 * @date 2020-05-23 16:49:15 
 */

import React from 'react';
import { Button, WingBlank, WhiteSpace } from 'antd-mobile';
import HeaderComponent from '../components/Header';
import { RouteComponentProps } from 'react-router';
import TypeItem from './components/TypeItem';
import './index.less';


const OrderType: React.FC<RouteComponentProps> = (props:RouteComponentProps) => {

  const goNext = (val) =>{
    props.history.push(`/subscribetime/${val}`)
  }

  return (
    <div className="orderType">
      <HeaderComponent text="预约人类别" />
      <WingBlank >
      <WhiteSpace />
        <div>
          <TypeItem goNext= {() =>goNext(1) } type="个人" subInfo="家庭/朋友/个人" />
          <TypeItem goNext= {() =>goNext(2) } type="团体" subInfo="旅行社/研学团队/社会组织团体" />
        </div>
        {/* <Button type="primary" onClick={() => props.history.push(`/subscribetime/${type}`)}>下一步 </Button> */}
      </WingBlank>
    </div>
  )
}

export default OrderType;